package com.ibis.debuglistwidget;

import android.app.AlarmManager;
import android.content.Context;

public enum Frequency {
    HOUR(R.string.freq_60_title, AlarmManager.INTERVAL_HOUR), HALF_HOUR(
            R.string.freq_30_title, AlarmManager.INTERVAL_HALF_HOUR), FIFTEEN_MINUTES(
            R.string.freq_15_title, AlarmManager.INTERVAL_FIFTEEN_MINUTES), TEN_MINUTES(
            R.string.freq_10_title, 600000), FIVE_MINUTES(
            R.string.freq_5_title, 300000), THREE_MINUTES(
            R.string.freq_3_title, 180000), ONE_MINUTE(R.string.freq_1_title,
            60000);

    private long value;
    private int id;

    private Frequency(int id, long value) {
        this.id = id;
        this.value = value;
    }

    public long getValue() {
        return value;
    }

    public String getTitle(Context context) {
        return context.getResources().getString(id);
    }
}